package com.design.pattern.create.factory.factoryMethod;

import com.design.pattern.entry.Bag;
import com.design.pattern.entry.Fruit;

/**
 * 水果商店测试
 *
 * @author gyf
 * @create 2018-11-30 17:11
 **/
public class FruitStoreTest {

    public static void main(String[] args) {
        BagFactory appleBagFactory = new AppleBagFactory();
        Bag bag = appleBagFactory.getBag();
        FruitFactory fruitFactory = new AppleFacroty();
        Fruit fruit = fruitFactory.getFruit();

        fruit.draw();
        bag.pack();
    }
}
